import {
    RNPackage,
    TurboModulesFactory,
  } from "@rnoh/react-native-openharmony/ts";
  import type {
    TurboModule,
    TurboModuleContext,
  } from "@rnoh/react-native-openharmony/ts";
  import { DateTimePickerAndroidModule } from './DateTimePickerAndroidModule';
  
  class DateTimePickerAndroidModulesFactory extends TurboModulesFactory {
    createTurboModule(name: string): TurboModule | null {
      if (name === 'RTNDateTimePickerAndroid') {
        return new DateTimePickerAndroidModule(this.ctx);
      }
      return null;
    }
  
    hasTurboModule(name: string): boolean {
      return name === 'RTNDateTimePickerAndroid';
    }
  }
  
  export class DateTimePickerAndroidPackage extends RNPackage {
    createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
      return new DateTimePickerAndroidModulesFactory(ctx);
    }
  }
  